/**
 * Created by Administrator on 2016/12/5 0005.
 */
app.controller("portal",["$scope",'$location',function($scope,$location){
    $("a").click(function(e){
        e.preventDefault();
    });
    $(".remove").click(function(){
        $(".deletePortal").show();
    });
    $scope.deletePortal = function(){
        $(".deletePortal").hide();
    };
    $scope.cancelDeletePortal = function(){
        $(".deletePortal").hide();
    };
    $('input').iCheck({
        checkboxClass: 'icheckbox_minimal-green',
        radioClass: 'iradio_minimal-green',
        increaseArea: '20%' // optional
    });
}]);
app.controller("portalTable",["$scope",function(){
    $('#portalTable').bootstrapTable({
        columns: [
            {
                checkbox: true
            }, {
                field: 'portalName',
                title: '门户名称',
                align:"left",
                halign:"center"
            },{
                field: 'portalURI',
                title: 'URI',
                align:"left",
                halign:"center"
            },{
                field: 'isEnable',
                title: '启用',
                width:50
            }, {
                field: 'isDefault',
                title: '禁用',
                width:50
            }
        ],
        data: [
            {
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            },{
                portalName:'企业',
                portalURI:'../company/company.html',
                isEnable:'<input type="checkbox">',
                isDefault:'<input type="checkbox">'
            }
        ],
        pagination :true,
        paginationLoop: false,
        striped :true,
        paginationPreText : "上一页",
        paginationNextText :"下一页",
        undefinedText : "暂无数据",
        showColumns :true,
        showExport : true,
        showRefresh :true,
        height:711,
        showPaginationSwitch:true,
        pageSize:15,
        pageList :[10,15,20]
    });
}]);
